$(document).ready(function () {

	// Change the title of the page
	document.title = $("#TestName").html() + ' - ' + $($(".TestInfoValue")[1]).html();
	
	// Event handler for submit button
	$("#SubmitButton").click(function () {
		if($("#ValidPledgeChBx").is(":checked"))
		{
			$("#TestForm").submit();
		}
		else
		{
			$( "#PledgeDialog" ).dialog({
			width: 600,
			height: 190,
			buttons: {
						"Yes": function() {
							$("#TestForm").submit();
						},
						"No": function() {
						  $( this ).dialog( "close" );

						}
					  }
			});
		}
	});

});